bitkeeper revision 1.713.1.1 (4027cee4DwiREGMFe_AVrFnHsCg2Ug)
authorbr260@labyrinth.cl.cam.ac.uk <br260@labyrinth.cl.cam.ac.uk>
Mon, 9 Feb 2004 18:18:12 +0000 (18:18 +0000)
committerbr260@labyrinth.cl.cam.ac.uk <br260@labyrinth.cl.cam.ac.uk>
Mon, 9 Feb 2004 18:18:12 +0000 (18:18 +0000)
Add comment.

BitKeeper/etc/ignore
tools/xc/lib/xc_netbsd_build.c
xen/include/hypervisor-ifs/hypervisor-if.h

index 3374b47fa9a11a3dcd399fbc8f6ebc2e5e95cfe7..f6915983dbf084b05ab1d87e8aeefd53c777512b 100644 (file)
@@ -538,3 +538,4 @@ xen/arch/i386/flushtlb.o
 xen/common/rbtree.o
 xen/drivers/block/cciss.o
 xen/drivers/block/cciss_scsi.o
+TAGS
index adf7c6774a402f34cbeadfa5ae15537d0b1b25a9..5736ca58267aab127a63ddc6d679f5bf9af5099e 100644 (file)
@@ -503,7 +503,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array,
     }
     curpos += ehdr.e_phnum * sizeof(Elf_Phdr);
 
-
+    /* Copy kernel .text .data .bss segments into physical memory */
     for (h = 0; h < ehdr.e_phnum; h++) {
         if (phdr[h].p_type != PT_LOAD ||
             (phdr[h].p_flags & (PF_W|PF_X)) == 0)
@@ -585,6 +585,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array,
     maxva += sizeof(Elf_Ehdr) + ehdr.e_shnum * sizeof(Elf_Shdr);
     maxva = (maxva + ELFROUND - 1) & ~(ELFROUND - 1);
 
+    /* Copy kernel string / symbol tables into physical memory */
     for (h = 0; h < ehdr.e_shnum; h++) {
         if (shdr[h].sh_type == SHT_STRTAB) {
             for (i = 0; i < ehdr.e_shnum; i++)
@@ -593,7 +594,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array,
                     break;
             if (i == ehdr.e_shnum) {
                 shdr[h].sh_offset = 0;
-                continue;
+                continue;  /* Skip string tables which are not for symbol tables */
             }
         }
 
@@ -606,7 +607,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array,
             }
             curpos = shdr[h].sh_offset;
 
-            shdr[h].sh_offset = maxva - *symtab_addr;
+            shdr[h].sh_offset = maxva - *symtab_addr;  /* Mangled to be based on ELF header location */
 
             DPRINTF(("copy section %d, size 0x%x\n", h, shdr[h].sh_size));
             for (i = 0; i < shdr[h].sh_size; i += c, maxva += c) {
@@ -635,7 +636,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array,
             maxva = (maxva + ELFROUND - 1) & ~(ELFROUND - 1);
 
         }
-        shdr[h].sh_name = 0;
+        shdr[h].sh_name = 0;  /* Name is NULL */
     }
 
     if (*symtab_len == 0) {
@@ -656,6 +657,7 @@ loadelfimage(gzFile kernel_gfd, int pm_handle, unsigned long *page_array,
     memcpy(p + sizeof(int), &ehdr, sizeof(Elf_Ehdr));
     *(int *)p = maxva - *symtab_addr;
 
+    /* Copy total length, crafted ELF header and section header table */
     s = sizeof(int) + sizeof(Elf_Ehdr) + ehdr.e_shnum * sizeof(Elf_Shdr);
     for (i = 0; i < s; i += c, symva += c) {
         c = PAGE_SIZE - (symva & (PAGE_SIZE - 1));
index ac1ecfd6f8b776af7cf8190ded20b0edfbc02500..4233d56285daae775c1d67ffcddec3363b46119e 100644 (file)
  * are also present in the initial GDT, many OSes will be able to avoid
  * installing their own GDT.
  */
-#define FLAT_RING1_CS 0x0819
-#define FLAT_RING1_DS 0x0821
-#define FLAT_RING3_CS 0x082b
-#define FLAT_RING3_DS 0x0833
+#define FLAT_RING1_CS 0x0819    /* GDT index 259 */
+#define FLAT_RING1_DS 0x0821    /* GDT index 260 */
+#define FLAT_RING3_CS 0x082b    /* GDT index 261 */
+#define FLAT_RING3_DS 0x0833    /* GDT index 262 */
 
 
 /*